package com.zzg;

import com.zzg.pipeline.MarkdownPipeline;
import com.zzg.processor.FoodWorldProcessor;
import com.zzg.processor.PageProcessor;

import us.codecraft.webmagic.Spider;

public class Application {

	/**
	 * 
	 * @Title: main   
	 * @Description: 爬虫程序入口   
	 * @param: @param args      
	 * @return: void      
	 * @throws
	 */
	public static void main(String[] args) {
		// url 地址
		// String url ="http://www.runoob.com/regexp/regexp-tutorial.html";
		// Spider.create(new PageProcessor()).addUrl(url).addPipeline(new MarkdownPipeline()).thread(1).run();
		for(int page_number=1; page_number <= 50; page_number++){
			String url = "https://home.meishichina.com/show-top-type-recipe-page-" + page_number + ".html";
			Spider.create(new FoodWorldProcessor()).addUrl(url).thread(1).run();
		}
	}

}
